import logging,yagmail,pytest
def loc1():
    logging.basicConfig(level=logging.DEBUG,
                        format='%(levelname)s %(message)s %(asctime)s %(filename)s %(lineno)d',
                        filename='hj.log',
                        filemode='w+')
def send(file):
    mail=yagmail.SMTP(user='3034738910@qq.com',password='aytttpqxjbbrddjh',host='smtp.qq.com')
    mail.send(to='3034738910@qq.com',subject='测试报告',contents='今日报告请查收',attachments=file)
# if __name__ == '__main__':
#     loc1()
#     pytest.main([r'C:\Users\30347\PycharmProjects\yuekao_1013\po\TestCase\TestCase.py', '-s', '--html=baogao.html'])
#     send(['hj.log', 'baogao.html'])